<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>v-model</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.12"></script>
</head>

<body>
    <div id="app">


        <input v-model="message" placeholder="请输入">
        <p>同步输出内容：{{message}}</p>

        <div>
            <input type="checkbox" id="1" value="擎天柱" v-model="checkedNames">
            <label for="擎天柱">擎天柱</label>
            <input type="checkbox" id="2" value="大黄蜂" v-model="checkedNames">
            <label for="大黄蜂">大黄蜂</label>
            <input type="checkbox" id="3" value="威震天" v-model="checkedNames">
            <label for="威震天">威震天</label>
            <br>
            <span>你选择了: {{ checkedNames }}</span>
        </div>

        <div>

            <input type="radio" id="one" value="燃烧的斧头" v-model="picked">
            <label for="one">燃烧的斧头</label>
            <br>
            <input type="radio" id="two" value="大宝剑" v-model="picked">
            <label for="two">大宝剑</label>
            <br>
            <span>你的选择: {{ picked }}</span>
        </div>

        <div>
            <select v-model="selected">
                <option disabled value="">请选择</option>
                <option>为了赛博坦</option>
                <option>为了地球</option>
                <option>为了太阳系</option>
            </select>
            <span>你决定: {{ selected }}</span>
        </div>
    </div>
    <script>

        let app = new Vue({
            el: "#app",
            data: {
                message: '',
                checkedNames: [],
                picked: '',
                selected: "",

            },

        })

    </script>


</body>

</html>